.class public Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;
.super Lcom/nemustech/regina/ElementReginaWidget;
.source "MissedNotiWidget.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$1;,
        Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;,
        Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;
    }
.end annotation


# static fields
.field private static final TAG:Ljava/lang/String; = "MissedNotiWidget"


# instance fields
.field private mCallLogReader:Lcom/nemustech/regina/widgets/missednoti/CallLogReader;

.field private mIntentFilter:Landroid/content/IntentFilter;

.field private mMissedNotiRunnable:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;

.field private mSMSInfoReader:Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;

.field private mUpdateBroadcastReceiver:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 4
    .parameter "context"

    .prologue
    const/4 v3, 0x0

    .line 35
    const/4 v1, 0x0

    invoke-direct {p0, p1, v1}, Lcom/nemustech/regina/ElementReginaWidget;-><init>(Landroid/content/Context;Z)V

    .line 37
    new-instance v2, Lcom/nemustech/regina/widgets/missednoti/CallLogReader;

    move-object v0, p1

    check-cast v0, Lcom/nemustech/regina/ReginaLauncher;

    move-object v1, v0

    invoke-direct {v2, v1}, Lcom/nemustech/regina/widgets/missednoti/CallLogReader;-><init>(Lcom/nemustech/regina/ReginaLauncher;)V

    iput-object v2, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mCallLogReader:Lcom/nemustech/regina/widgets/missednoti/CallLogReader;

    .line 38
    new-instance v1, Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;

    check-cast p1, Lcom/nemustech/regina/ReginaLauncher;

    .end local p1
    invoke-direct {v1, p1}, Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;-><init>(Lcom/nemustech/regina/ReginaLauncher;)V

    iput-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mSMSInfoReader:Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;

    .line 39
    new-instance v1, Landroid/content/IntentFilter;

    invoke-direct {v1}, Landroid/content/IntentFilter;-><init>()V

    iput-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mIntentFilter:Landroid/content/IntentFilter;

    .line 40
    new-instance v1, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;

    invoke-direct {v1, p0, v3}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;-><init>(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$1;)V

    iput-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mMissedNotiRunnable:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;

    .line 41
    iget-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mIntentFilter:Landroid/content/IntentFilter;

    const-string v2, "com.nemustech.regina.missednoti"

    invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 42
    new-instance v1, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;

    invoke-direct {v1, p0, v3}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;-><init>(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$1;)V

    iput-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mUpdateBroadcastReceiver:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;

    .line 43
    return-void
.end method

.method static synthetic access$200(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Landroid/content/Context;
    .locals 1
    .parameter "x0"

    .prologue
    .line 24
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$300(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Lcom/nemustech/regina/widgets/missednoti/CallLogReader;
    .locals 1
    .parameter "x0"

    .prologue
    .line 24
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mCallLogReader:Lcom/nemustech/regina/widgets/missednoti/CallLogReader;

    return-object v0
.end method

.method static synthetic access$400(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Landroid/content/res/Resources;
    .locals 1
    .parameter "x0"

    .prologue
    .line 24
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mResources:Landroid/content/res/Resources;

    return-object v0
.end method

.method static synthetic access$500(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"

    .prologue
    .line 24
    invoke-direct {p0, p1, p2}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->getMissedBitmap(Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$600(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Landroid/content/Context;
    .locals 1
    .parameter "x0"

    .prologue
    .line 24
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$700(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;
    .locals 1
    .parameter "x0"

    .prologue
    .line 24
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mSMSInfoReader:Lcom/nemustech/regina/widgets/missednoti/SMSInfoReader;

    return-object v0
.end method

.method static synthetic access$800(Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;)Landroid/content/res/Resources;
    .locals 1
    .parameter "x0"

    .prologue
    .line 24
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mResources:Landroid/content/res/Resources;

    return-object v0
.end method

.method private getMissedBitmap(Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
    .locals 11
    .parameter "icon"
    .parameter "count"

    .prologue
    const v10, 0x7f06005c

    const v9, 0x7f06005a

    const/4 v8, 0x0

    .line 124
    iget-object v5, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v6, 0x7f060059

    invoke-virtual {v5, v6}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v2

    .line 125
    .local v2, iconHeight:I
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    iget-object v6, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    invoke-virtual {v6, v9}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v6

    add-int/2addr v5, v6

    iget-object v6, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v7, 0x7f06005b

    invoke-virtual {v6, v7}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v6

    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v7

    mul-int/2addr v6, v7

    add-int v3, v5, v6

    .line 128
    .local v3, iconWidth:I
    sget-object v5, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v3, v2, v5}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 129
    .local v0, bitmapTarget:Landroid/graphics/Bitmap;
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 132
    .local v1, canvas:Landroid/graphics/Canvas;
    new-instance v5, Landroid/graphics/Paint;

    invoke-direct {v5}, Landroid/graphics/Paint;-><init>()V

    invoke-virtual {v1, p1, v8, v8, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 135
    new-instance v4, Landroid/graphics/Paint;

    invoke-direct {v4}, Landroid/graphics/Paint;-><init>()V

    .line 136
    .local v4, paint:Landroid/graphics/Paint;
    iget-object v5, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    invoke-virtual {v5, v10}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v5

    int-to-float v5, v5

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 137
    iget-object v5, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v6, 0x7f050014

    invoke-virtual {v5, v6}, Lcom/nemustech/regina/ResourceCare;->getColor(I)I

    move-result v5

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setColor(I)V

    .line 138
    sget-object v5, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 139
    const/4 v5, 0x1

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 140
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    iget-object v6, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    invoke-virtual {v6, v9}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v6

    add-int/2addr v5, v6

    int-to-float v5, v5

    div-int/lit8 v6, v2, 0x2

    iget-object v7, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    invoke-virtual {v7, v10}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v7

    div-int/lit8 v7, v7, 0x2

    add-int/2addr v6, v7

    int-to-float v6, v6

    invoke-virtual {v1, p2, v5, v6, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 143
    return-object v0
.end method


# virtual methods
.method protected hasBack()Z
    .locals 1

    .prologue
    .line 156
    const/4 v0, 0x0

    return v0
.end method

.method protected hasHorLine()Z
    .locals 1

    .prologue
    .line 205
    const/4 v0, 0x0

    return v0
.end method

.method protected hasTitle()Z
    .locals 1

    .prologue
    .line 151
    const/4 v0, 0x0

    return v0
.end method

.method protected hasVertLine()Z
    .locals 1

    .prologue
    .line 200
    const/4 v0, 0x1

    return v0
.end method

.method protected onCreate()V
    .locals 3

    .prologue
    .line 48
    invoke-virtual {p0}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->createWidgetWithOneRow()V

    .line 49
    invoke-super {p0}, Lcom/nemustech/regina/ElementReginaWidget;->getCenterPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v0

    const-string v1, "Missed Noti Widget Center Panel"

    iput-object v1, v0, Lcom/nemustech/tiffany/world/TFPanel;->mDescription:Ljava/lang/String;

    .line 50
    invoke-super {p0}, Lcom/nemustech/regina/ElementReginaWidget;->getFrontCenterItemPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v0

    const-string v1, "Missed Noti Widget Center Item Panel"

    iput-object v1, v0, Lcom/nemustech/tiffany/world/TFPanel;->mDescription:Ljava/lang/String;

    .line 52
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mUpdateBroadcastReceiver:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;

    iget-object v2, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mIntentFilter:Landroid/content/IntentFilter;

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 53
    return-void
.end method

.method protected onDrawBackItem(Landroid/graphics/Bitmap;Landroid/graphics/Rect;I)V
    .locals 0
    .parameter "bitmap"
    .parameter "area"
    .parameter "index"

    .prologue
    .line 196
    return-void
.end method

.method protected onDrawBackTitle(Landroid/graphics/Bitmap;Landroid/graphics/Rect;)V
    .locals 0
    .parameter "bitmap"
    .parameter "area"

    .prologue
    .line 192
    return-void
.end method

.method protected onDrawFrontItem(Landroid/graphics/Bitmap;Landroid/graphics/Rect;I)V
    .locals 1
    .parameter "bitmap"
    .parameter "area"
    .parameter "index"

    .prologue
    .line 58
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mMissedNotiRunnable:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;

    invoke-virtual {v0, p1, p2}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->setMissedNotiRes(Landroid/graphics/Bitmap;Landroid/graphics/Rect;)V

    .line 59
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mMissedNotiRunnable:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;

    invoke-virtual {v0}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$MissedNotiBitmapRunnable;->run()V

    .line 121
    return-void
.end method

.method protected onDrawFrontTitle(Landroid/graphics/Bitmap;Landroid/graphics/Rect;)V
    .locals 0
    .parameter "bitmap"
    .parameter "area"

    .prologue
    .line 147
    return-void
.end method

.method protected onPause()V
    .locals 3

    .prologue
    .line 173
    :try_start_0
    iget-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mUpdateBroadcastReceiver:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
    :try_end_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0

    .line 177
    :goto_0
    return-void

    .line 174
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 175
    .local v0, e:Ljava/lang/IllegalArgumentException;
    invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    goto :goto_0
.end method

.method protected onResume()V
    .locals 3

    .prologue
    .line 166
    iget-object v0, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mUpdateBroadcastReceiver:Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget$UpdateMissedTelephonyBroadcastReceiver;

    iget-object v2, p0, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->mIntentFilter:Landroid/content/IntentFilter;

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 167
    invoke-virtual {p0}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->update()V

    .line 168
    return-void
.end method

.method protected onUpdate()Z
    .locals 1

    .prologue
    .line 161
    const/4 v0, 0x1

    return v0
.end method

.method protected onUpdateTitle()Z
    .locals 1

    .prologue
    .line 210
    const/4 v0, 0x0

    return v0
.end method

.method public update()V
    .locals 0

    .prologue
    .line 188
    invoke-virtual {p0}, Lcom/nemustech/regina/widgets/missednoti/MissedNotiWidget;->updateFrontCenterItemPanel()V

    .line 189
    return-void
.end method
